#include "junix.h"

int main(int argc, char **argv)
{
	fprintf(stdout,"%s\n",getcwd(NULL,0) ); 
	if(-1==chroot(".") )
		err_sys("chroot");
	fprintf(stdout,"%s\n",getcwd(NULL,0) ); 

	if (clearenv() )
		err_quit("clearenv");

	if (putenv("PATH=/bin/:/usr/bin") )
		err_sys("put_env");
	fprintf(stdout,"%s\n",getenv("PATH") ); 

	int ret=system("/bin/date");
	if(ret)
		err_quit("system error");

	return 0;
}

